<include file="header" />
<head>
	<link rel="stylesheet" href="/assets/base/repair/js/sweetalert/lib/sweet-alert.css">
</head>
<body>
<div class="wraper">

    <div class="top">
	    <if condition="$data.status eq 0">
	        <p>
	            <a onclick ="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
	            <a href="#" class="order-all pull-left">待付款</a>
	        </p>
		</if>
	    <if condition="$data.status eq 1">
	        <p>
	            <a onclick ="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
	            <a href="#" class="order-all pull-left">已付款，待领取</a>
	        </p>
		</if>
	    <if condition="$data.status eq 2">
	        <p>
	            <a onclick ="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
	            <a href="#" class="order-all pull-left">已领取，待评价</a>
	        </p>
		</if>

	    <if condition="$data.status eq 4">
		    <p>
			    <a onclick ="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
			    <a href="#" class="order-all pull-left">已评价</a>
		    </p>
	    </if>
	    <if condition="$data.status eq 7">
		    <p>
			    <a onclick ="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
			    <a href="#" class="order-all pull-left">订单已取消</a>
		    </p>
	    </if>
	    <if condition="$data.status eq 8">
		    <p>
			    <a onclick ="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
			    <a href="#" class="order-all pull-left">订单已关闭</a>
		    </p>
	    </if>
    </div>

    <div class="order-lists lists">
        <a href="/irs/irs/menu/restaurant_id/{BEESCRM:$data.restaurant_id}/irs_id/{BEESCRM:$irs_id}">
	    <div class="lists tb-mode bottom-none">
            <div class="tb-cell list-left">
                {BEESCRM:$data.restaurant_name}
            </div>
            <div class="tb-cell list-right"><span class="iconfont icon-you"></span></div>
        </div>
        </a>
    </div>
    <div class="order-lists lists">
        <div class="lists tb-mode">
            <a href="#" class="tb-cell list-left">菜单详情（<span class="num">{BEESCRM:$count}</span>个菜）</a>
        </div>
	    <volist name="goodList" id="vo">
		    <div class="lists tb-mode foods">
			    <a href="#" class="tb-cell list-left">
				    <div class="img-box"><img src="{BEESCRM:$vo.goods_logo}"></div>
			    </a>
			    <a href="#" class="tb-cell list-center">
				    <p>{BEESCRM:$vo.goods_name}</p>
				    <p class="prize">{BEESCRM:$vo.goods_price}元</p>
			    </a>
			    <div class="tb-cell list-right">
				    <div class="tb-mode amount" style="text-align: center;border:0;">
					    {BEESCRM:$vo.goods_num}
				    </div>
			    </div>
		    </div>
	    </volist>

        <div class="lists tb-mode bottom-none">
            <div class="tb-cell list-right">总价：<span class="num">{BEESCRM:$data.money_sum}元</span></div>

	        <!--<if condition="$data.status eq 4">-->
		        <!--<div class="tb-cell list-right"><span class="order-btn cancle">已评价</span></div>-->
	        <!--</if>-->
	        <!--<if condition="$data.status eq 2">-->
		        <!--<div class="tb-cell list-right"><a href="javascript:void(0);" class="order-btn pinjia" data-id="{BEESCRM:$data.restaurant_id}" data-order_id="{BEESCRM:$data.order_id}">评价</a></div>-->
	        <!--</if>-->
	        <!--<if condition="$data.status eq 0">-->
		        <!--&lt;!&ndash;<div class="tb-cell list-right"><a href="javascript:void(0);" class="order-btn cancle reset" data-order_id="{BEESCRM:$data.order_id}">取消</a><a href="/index.php?g=base&m=restaurant&a=confirmOrders&order_id={BEESCRM:$data.order_id}&res_id={BEESCRM:$res_id}" class="order-btn success" data-order_id="{BEESCRM:$data.order_id}">去付款</a></div>&ndash;&gt;-->
	        <!--</if>-->
	        <!--<if condition="$data.status eq 1">-->
		        <!--<div class="tb-cell list-right"><span class="order-btn cancle">待领取</span></div>-->
	        <!--</if>-->

	        <!--<if condition="$data.status eq 7">-->
		        <!--<div class="tb-cell list-right"><a class="order-btn cancle">已取消</a></div>-->
	        <!--</if>-->
	        <!--<if condition="$data.status eq 8">-->
		        <!--<div class="tb-cell list-right"><a class="order-btn cancle">已关闭</a></div>-->
	        <!--</if>-->
        </div>
    </div>

	<if condition="$data.status eq 4">
		<div class="order-lists lists">
			<div class="lists">
				<p class="stars star3">
					口味：
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
				</p>
			</div>

			<div class="lists">
				<p class="stars star4">
					质量：
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
					<span class="iconfont icon-xingxing big-star grey-star"></span>
				</p>
			</div>

			<div class="lists tb-mode">
				<p class="stars tb-cell" style="width: 36px;">内容：</p>
				<textarea placeholder="" class="tb-cell pj-nr" id="comment" maxlength="330" disabled="disabled"></textarea>
			</div>
		</div>
	</if>

    <div class="order-lists lists">
        <div class="lists order-mes bottom-none">
            <p><span class="field">地址：</span>{BEESCRM:$data.restaurant_name}</p>
	        <p><span class="field">下单时间：</span>{BEESCRM:$data.create_time|date="Y-m-d H:i",###}</p>
			<p><span class="field">就餐时间：</span>{BEESCRM:$data.take_time}</p>
            <p><span class="field">付款方式：</span>微信支付</p>
            <p><span class="field">订单编号：</span>{BEESCRM:$data.order_sn}</p>
			<p><span class="field">是否外带：</span>{BEESCRM:$data.take_out}</p>
			<p><span class="field">口味：</span><if condition="$data.flavor neq ''">{BEESCRM:$data.flavor}<else/>正常</if></p>
            <p><span class="field">备注：</span>{BEESCRM:$data.memo}</p>
        </div>
    </div>
	<if condition="$data.status eq 0">
		<div class="btn-box">
			<a href="javascript:void(0)" style="width: 50%" class="btn orange-btn reset" data-order_id="{BEESCRM:$data.order_id}">取消订单</a>
			<a href="/index.php?g=irs&m=irs&a=confirmOrders&order_id={BEESCRM:$data.order_id}&irs_id={BEESCRM:$irs_id}" style="width: 50%" class="btn green-btn">立即付款</a>
		</div>
	</if>
	<if condition="($data.status eq 3) || ($data.status eq 4)">
	<div class="btn-box">
		<a href="/irs/irs/menu/restaurant_id/{BEESCRM:$data.restaurant_id}/irs_id/{BEESCRM:$irs_id}" class="btn green-btn">还吃这家！</a>
	</div>
	</if>
	<if condition="$data.status eq 2">
		<div class="btn-box">
			<a href="javascript:void(0);" class="btn green-btn order-btn pinjia" data-id="{BEESCRM:$data.restaurant_id}" data-order_id="{BEESCRM:$data.order_id}">评价</a>
		</div>
	</if>
</div>
<input class="irs_id" type="hidden" value="{BEESCRM:$irs_id}">
<div class="pop-box" id="order-comment">
	<div class="main comment-box">
		<div class="top">
			<p>
				<a href="#" class="iconfont icon-guanbi pull-left" id="pj-close"></a>
				<a href="#" class="order-all pull-left">发表评价</a>
			</p>
		</div>
		<div class="block-opacity block-bg">
			<p class="bow"><img src="/assets/base/restaurant/images/bow.png"></p>
			<p>评论一下，消消食~</p>
		</div>
		<div class="lists">
			<p class="stars star1">
				口味：
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
			</p>
		</div>

		<div class="lists">
			<p class="stars star2">
				质量：
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
				<span class="iconfont icon-xingxing star big-star grey-star"></span>
			</p>
		</div>

		<div class="lists tb-mode">
			<p class="stars tb-cell" style="width: 36px;">内容：</p>
			<textarea class="tb-cell pj-nr" maxlength="330"></textarea>
		</div>
		<input class="rstid" type="hidden">
		<input class="order_id" type="hidden">
		<a href="javascript:void(0);" class="pj-btn">确认提交</a>
	</div>
</div>
<include file="commonJS" />
<script src="/assets/irs/js/order.js"></script>
<script src="/assets/activity/vote/js/modalEffects.js"></script>
<script>
	$(function(){
		var taste = {BEESCRM:$data.taste_comment};
		var quality = {BEESCRM:$data.quality_comment};
		var comment = '{BEESCRM:$data.comment}';
		$(".star3 span:lt("+taste+")").css('color','#ff9900');
		$(".star4 span:lt("+quality+")").css('color','#ff9900');
		document.getElementById("comment").innerText=comment;
	});
</script>
</body>
</html>
